--[[
    在线奖励提示小图标组件，通常在游戏过程中使用
    仅在可以“直接领取”或“看广告领取”时显示，否则隐藏
]]

local app = require "app"
local gamelib = require "club.threecard.gamelib"
local base = require "ui.widgets.OnlineBonus"
local log = app.logging.get("online_bonus")

local M = gamelib.ui.element(base)

function M:on_update(quest)
end

function M:on_ready(quest)
    -- self.animator:SetBool("AdsReady", false)
    -- self.animator:SetBool("Ready", true)
end

function M:on_boostable(quest)
    -- self.animator:SetBool("AdsReady", true)
    -- self.animator:SetBool("Ready", false)
end

function M:on_countdown(quest)
    self:hide()
end

function M:get_chip_transform()
    return self.loaded and self.transform
end

function M:on_injected(bind)
    bind("button.click", self.button, self.on_click)
    bind("gameobject.enable", self.gameobject, self.update)
    app.utility.button_style.highlight(self.button)
    -- self.animator.keepAnimatorControllerStateOnDisable = true
end

return M